home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / crwdemo / font.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1995-12-05  |  11.0 KB  |  348 lines

  1. VERSION 2.00
  2. Begin Form Font 
  3.    BackColor       =   &H00C0C0C0&
  4.    Caption         =   "Section and Field Fonts..."
  5.    ClientHeight    =   5370
  6.    ClientLeft      =   4590
  7.    ClientTop       =   1185
  8.    ClientWidth     =   6675
  9.    Height          =   6060
  10.    Left            =   4530
  11.    LinkTopic       =   "Form1"
  12.    ScaleHeight     =   5370
  13.    ScaleWidth      =   6675
  14.    Top             =   555
  15.    Width           =   6795
  16.    Begin CommonDialog CMDialog1 
  17.       CancelError     =   -1  'True
  18.       FontName        =   "Arial"
  19.       FontSize        =   10
  20.       Left            =   90
  21.       Top             =   4410
  22.    End
  23.    Begin CommandButton Command3 
  24.       Caption         =   "Help"
  25.       Height          =   375
  26.       Left            =   4320
  27.       TabIndex        =   23
  28.       Top             =   4320
  29.       Width           =   1815
  30.    End
  31.    Begin CommandButton Command2 
  32.       Caption         =   "OK"
  33.       Height          =   375
  34.       Left            =   2340
  35.       TabIndex        =   22
  36.       Top             =   4320
  37.       Width           =   1815
  38.    End
  39.    Begin CommandButton Command1 
  40.       Caption         =   "Choose Font....."
  41.       Height          =   375
  42.       Left            =   360
  43.       TabIndex        =   21
  44.       Top             =   4320
  45.       Width           =   1815
  46.    End
  47.    Begin SSPanel Statusbar 
  48.       Alignment       =   1  'Left Justify - MIDDLE
  49.       BorderWidth     =   1
  50.       Height          =   510
  51.       Left            =   0
  52.       TabIndex        =   20
  53.       Top             =   4905
  54.       Width           =   6675
  55.    End
  56.    Begin SSPanel Panel3D3 
  57.       Alignment       =   1  'Left Justify - MIDDLE
  58.       BevelInner      =   1  'Inset
  59.       BevelWidth      =   2
  60.       BorderWidth     =   1
  61.       Caption         =   "Panel3D3"
  62.       Height          =   1320
  63.       Left            =   3420
  64.       TabIndex        =   8
  65.       Top             =   2655
  66.       Width           =   2895
  67.       Begin PictureBox Picture1 
  68.          Height          =   1140
  69.          Left            =   90
  70.          Picture         =   FONT.FRX:0000
  71.          ScaleHeight     =   1110
  72.          ScaleWidth      =   2685
  73.          TabIndex        =   9
  74.          Top             =   90
  75.          Width           =   2715
  76.          Begin Label Label3 
  77.             Alignment       =   2  'Center
  78.             Caption         =   "Crystal Clear!"
  79.             FontBold        =   0   'False
  80.             FontItalic      =   0   'False
  81.             FontName        =   "Wide Latin"
  82.             FontSize        =   9
  83.             FontStrikethru  =   0   'False
  84.             FontUnderline   =   0   'False
  85.             Height          =   555
  86.             Left            =   1350
  87.             TabIndex        =   24
  88.             Top             =   270
  89.             Width           =   1275
  90.          End
  91.       End
  92.    End
  93.    Begin SSPanel Panel3D2 
  94.       Alignment       =   1  'Left Justify - MIDDLE
  95.       BevelInner      =   1  'Inset
  96.       BevelWidth      =   2
  97.       BorderWidth     =   1
  98.       Height          =   2400
  99.       Left            =   3420
  100.       TabIndex        =   1
  101.       Top             =   135
  102.       Width           =   2940
  103.       Begin SSFrame Frame3D4 
  104.          ForeColor       =   &H00000000&
  105.          Height          =   1410
  106.          Left            =   180
  107.          TabIndex        =   7
  108.          Top             =   810
  109.          Width           =   2580
  110.          Begin SSOption Option3D2 
  111.             Caption         =   "Both"
  112.             Height          =   195
  113.             Index           =   2
  114.             Left            =   360
  115.             TabIndex        =   10
  116.             TabStop         =   0   'False
  117.             Top             =   1035
  118.             Width           =   1275
  119.          End
  120.          Begin SSOption Option3D2 
  121.             Caption         =   "All Fields in Section"
  122.             Height          =   285
  123.             Index           =   1
  124.             Left            =   360
  125.             TabIndex        =   11
  126.             TabStop         =   0   'False
  127.             Top             =   630
  128.             Width           =   1995
  129.          End
  130.          Begin SSOption Option3D2 
  131.             Caption         =   "All Text in Section"
  132.             Height          =   195
  133.             Index           =   0
  134.             Left            =   360
  135.             TabIndex        =   12
  136.             Top             =   270
  137.             Value           =   -1  'True
  138.             Width           =   1815
  139.          End
  140.       End
  141.       Begin SSFrame Frame3D2 
  142.          ForeColor       =   &H00000000&
  143.          Height          =   555
  144.          Left            =   180
  145.          TabIndex        =   3
  146.          Top             =   225
  147.          Width           =   2580
  148.          Begin Label Label2 
  149.             Alignment       =   2  'Center
  150.             BackColor       =   &H00C0C0C0&
  151.             Caption         =   "Choose type to modify"
  152.             Height          =   195
  153.             Left            =   90
  154.             TabIndex        =   5
  155.             Top             =   180
  156.             Width           =   2445
  157.          End
  158.       End
  159.    End
  160.    Begin SSPanel Panel3D1 
  161.       Alignment       =   1  'Left Justify - MIDDLE
  162.       BevelInner      =   1  'Inset
  163.       BevelWidth      =   2
  164.       BorderWidth     =   1
  165.       Height          =   3840
  166.       Left            =   270
  167.       TabIndex        =   0
  168.       Top             =   135
  169.       Width           =   2940
  170.       Begin SSFrame Frame3D3 
  171.          ForeColor       =   &H00000000&
  172.          Height          =   2580
  173.          Left            =   180
  174.          TabIndex        =   6
  175.          Top             =   855
  176.          Width           =   2580
  177.          Begin SSOption Option3D1 
  178.             Caption         =   "All Sections"
  179.             Height          =   195
  180.             Index           =   0
  181.             Left            =   270
  182.             TabIndex        =   14
  183.             Top             =   225
  184.             Value           =   -1  'True
  185.             Width           =   1410
  186.          End
  187.          Begin SSOption Option3D1 
  188.             Caption         =   "Grand Total"
  189.             Height          =   240
  190.             Index           =   6
  191.             Left            =   270
  192.             TabIndex        =   13
  193.             TabStop         =   0   'False
  194.             Top             =   2160
  195.             Width           =   1320
  196.          End
  197.          Begin SSOption Option3D1 
  198.             Caption         =   "Page Footer"
  199.             Height          =   240
  200.             Index           =   5
  201.             Left            =   270
  202.             TabIndex        =   19
  203.             TabStop         =   0   'False
  204.             Top             =   1845
  205.             Width           =   1455
  206.          End
  207.          Begin SSOption Option3D1 
  208.             Caption         =   "Group Footer"
  209.             Height          =   285
  210.             Index           =   4
  211.             Left            =   270
  212.             TabIndex        =   18
  213.             TabStop         =   0   'False
  214.             Top             =   1485
  215.             Width           =   1545
  216.          End
  217.          Begin SSOption Option3D1 
  218.             Caption         =   "Details"
  219.             Height          =   240
  220.             Index           =   3
  221.             Left            =   270
  222.             TabIndex        =   17
  223.             TabStop         =   0   'False
  224.             Top             =   1170
  225.             Width           =   1365
  226.          End
  227.          Begin SSOption Option3D1 
  228.             Caption         =   "Group Header"
  229.             Height          =   195
  230.             Index           =   2
  231.             Left            =   270
  232.             TabIndex        =   16
  233.             TabStop         =   0   'False
  234.             Top             =   855
  235.             Width           =   1635
  236.          End
  237.          Begin SSOption Option3D1 
  238.             Caption         =   "Page Header"
  239.             Height          =   195
  240.             Index           =   1
  241.             Left            =   270
  242.             TabIndex        =   15
  243.             TabStop         =   0   'False
  244.             Top             =   540
  245.             Width           =   1545
  246.          End
  247.       End
  248.       Begin SSFrame Frame3D1 
  249.          ForeColor       =   &H00000000&
  250.          Height          =   600
  251.          Left            =   135
  252.          TabIndex        =   2
  253.          Top             =   180
  254.          Width           =   2625
  255.          Begin Label Label1 
  256.             Alignment       =   2  'Center
  257.             BackColor       =   &H00C0C0C0&
  258.             Caption         =   "Choose Section to modify "
  259.             Height          =   285
  260.             Left            =   90
  261.             TabIndex        =   4
  262.             Top             =   225
  263.             Width           =   2445
  264.          End
  265.       End
  266.    End
  267.    Begin Menu FontFile 
  268.       Caption         =   "&File"
  269.    End
  270. Sub Command1_Click ()
  271.     On Error GoTo FontErr
  272.     CMDialog1.Flags = &H2& Or &H200& Or &H100&
  273.     CMDialog1.Action = 4
  274.     CRWFontName = CMDialog1.FontName
  275.     'MsgBox "Font Name is=" + CRWFontName
  276.     CRWFontSize = CMDialog1.FontSize
  277.     'MsgBox "Font Size =" + Str(CRWFontSize)
  278.     If CMDialog1.FontItalic = True Then
  279.        CRWFontItalic = 1
  280.     Else
  281.        CRWFontItalic = 0
  282.     End If
  283.      
  284.     If CMDialog1.FontUnderLine = True Then
  285.        CRWFontUnderline = 1
  286.     Else
  287.        CRWFontUnderline = 0
  288.     End If
  289.     If CMDialog1.FontStrikeThru = True Then
  290.        CRWFontStrikeThru = 1
  291.     Else
  292.        CRWFontStrikeThru = 0
  293.     End If
  294.    If PESetFont(JobNum, SectionCode, ScopeCode, CRWFontName, 0, 0, 0, CRWFontSize, CRWFontItalic, CRWFontUnderline, CRWFontStrikeThru, 0) = False Then
  295.       RCode = GetErrorString(JobNum)
  296.       MsgBox "PESetFont Error #: " + Str(ErrorCode) + " - " + RCode
  297.    Else
  298.         Font!Statusbar.Caption = "Section Fonts have been modified!"
  299.    End If
  300.    Exit Sub
  301. FontErr:
  302.   'MsgBox "User hit Cancel"
  303. Exit Sub
  304. End Sub
  305. Sub Command2_Click ()
  306.  Unload Me
  307. End Sub
  308. Sub Command3_Click ()
  309.  RCode = Shell("Winhelp c:\crw\crw.hlp", 3)
  310.  If RCode = False Then
  311.    MsgBox ("RedPoint cannot find the Crystal Help file in C:\CRW directory")
  312.  End If
  313. End Sub
  314. Sub FontFile_Click ()
  315.  Unload Me
  316. End Sub
  317. Sub Form_Load ()
  318.   ScopeCode = 2
  319. End Sub
  320. Sub Option3D1_Click (Index As Integer, Value As Integer)
  321.    Select Case Index
  322.     Case 0:
  323.       SectionCode = 0    'PE_AllSections
  324.     Case 1:
  325.       SectionCode = 2000 'PE_HeaderSection
  326.     Case 2:
  327.       SectionCode = 3000 'PE_GroupHeader
  328.     Case 3:
  329.       SectionCode = 4000 'PE_DetailSection
  330.     Case 4:
  331.       SectionCode = 5000 'PE_GroupFooter
  332.     Case 5:
  333.       SectionCode = 7000 'PE_FooterSection
  334.     Case 6:
  335.       SectionCode = 6000 'PE_GrandTotalSection
  336.    End Select
  337. End Sub
  338. Sub Option3D2_Click (Index As Integer, Value As Integer)
  339.    Select Case Index
  340.     Case 0:
  341.       ScopeCode = 2 'PE_Text
  342.     Case 1:
  343.       ScopeCode = 1  'PE_Fields
  344.     Case 2:
  345.       ScopeCode = 1 Or 2  'PE_Text Or PE_Fields
  346.    End Select
  347. End Sub
  348.